<template>
  <div class=''>
    <div class="p-3">
      <h4>历史文章</h4>
      <ol class="list-unstyled mb-0">
        <li v-for="(item, index) in datas" :key="index">
          <a :href="`/article/${item.id}`" target="_blank">
            {{ item.title }}
          </a>
        </li>
      </ol>
    </div>
  </div>
</template>
<script>
import api from '@/api'
export default {
  name: 'classify-list',
  title: '分类列表',
  created() {
    this.getHistroy()
  },
  data() {
    return {
      datas: []
    }
  },
  methods: {
    getHistroy() {
      console.log('api.articleHistory', api.articleHistory);
      this.$get(api.articleHistory).then(res => {
        this.datas = res.data.data
      }).catch(err => {
        console.log('err', err);
      })
    }
  }
}
</script>
<style lang = 'scss'>
</style>